var mongoose = require("mongoose")
var Schema = mongoose.Schema;




//留言数据 映射
var comment_schema = new Schema({
    title:String,
    content:String,
    time:Date,
    author:String,
    residents:Object,
    mid:String
})

exports.CommentModel = mongoose.model("comments",comment_schema)

var mongoose = require("mongoose")
var Schema = mongoose.Schema;

var user_schema = new Schema({
    username:String,
    age:Number,
    password:String,
    nikename:String,
    phone:String
})

exports.UsersModel = mongoose.model('users',user_schema);


// movie  
var movie_schema = new Schema({
    "genres": Array,
    "casts": Array,
    "directors": Array,
    "rating": Object,
    "title": String,
    "collect_count": Number,
    "original_title": String,
    "subtype": String,
    "year": String,
    "images": Object,
    "alt": String,
    "id": String
})

exports.MovieModel = mongoose.model("movies",movie_schema)




var whusers_schema = new Schema({
    username:String,
    phone:String,
    nickname:String,
    age:Number,
    pass:String,
    time:Date 
})

exports.WhuserModel = mongoose.model("whusers",whusers_schema)


//车库映射

var parklots_Schema = new Schema({
    parklotId : String,
    area:String,
    parklotName:String,
    status:Boolean,
    // carId:String,
    // carOf:String,
    // carPhone:String,

})
// var comment_schema = new Schema({
//     title:String,
//     content:String,
//     time:Date,
//     author:String,
//     movie:Object,
//     mid:String
// })

// exports.CommentModel = mongoose.model("comments",comment_schema)

var xiaoqus_schema = new Schema({
    id:String,
    dong:String,
    danyuan:String,
    louceng:String,
    menpai:String
})
exports.parklotsModel = mongoose.model("parklots",parklots_Schema);







exports.XiaoqusModel = mongoose.model("xiaoqus",xiaoqus_schema)
exports.CommentModel = mongoose.model("comments",comment_schema)
